// 导入跨域中间件
const proxy=require('http-proxy-middleware');
module.exports=function(app){
    app.use(proxy.createProxyMiddleware('/api',{
        target:'http://localhost:4000',
        pathRewrite:{
            '^/api':''
        }
    }));
}

// http://localhost:4000/banner